/**
 * 
 */
package com.ambow.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author Administrator
 * @param 订单详表
 */
@Entity
@Table
public class OrderDetail extends ID implements Serializable {
	private int amount;//数量
	@ManyToOne(targetEntity=Product.class)
	@JoinColumn(name="product_id",referencedColumnName="id")
	private Product product;
	@ManyToOne(targetEntity=Orders.class)
	@JoinColumn(name="order_id",referencedColumnName="id")
	private Orders order;
	public int getAmount() {
		return amount;
	}
	public void setAmount(int amount) {
		this.amount = amount;
	}
	public Product getProduct() {
		return product;
	}
	public void setProduct(Product product) {
		this.product = product;
	}
	public Orders getOrder() {
		return order;
	}
	public void setOrder(Orders order) {
		this.order = order;
	}
	
	

}
